<?php


namespace app\admins\controller;

use \think\Controller;
use \think\Db;
class User extends Controller{

	public function user_list(){
		$users=Db::name('user')->select();
		$this->assign('users',$users);
		return $this->fetch();
	}
	public function member_show($id){
		//$this->user_list();//调用user_list里面的方法
		$users1=Db::name('user')->where('u_id',$id)->find();
		$this->assign('users1',$users1);
		// print_r($users1);
		
		return $this->fetch();
	}
	public function edit(){
		$u_id= input('param.u_id');
		$user=Db::name("user")->find($u_id);//find里面默认传主键，不然找不着
		echo json_encode($user);
	}
	
}